//
//  Student.m
//  LearnOCbase
//
//  Created by China Dragon on 2023/6/11.
//

#import "Student8.h"
#import "Book8.h"

@implementation Student8

/*
    因为在Student.h文件里，他们的属性前面加了 retain 参数，会自动生成下面的代码
 */

//- (void)setBook:(Book *)book{
//    if(_book != book){//_book 系统自动生成
////        [_book release];
////        _book = [book retain];
//    }
//}
//
//- (void)setCard:(Card *)card{
//    if(_card != card){
////        [_card release];
////        _card = [card retain];
//    }
//}

- (void)dealloc{ //释放对象
    NSLog(@"student 对象被销毁 ");
//    [_book release]; 相当于 self.book = nil
//    [_card release]; 相当于 self.card = nil
//    [super dealloc];
}

@end
